/**
 * 2017年10月11日
 */
package exp.algorithm;

import org.apache.lucene.search.spell.NGramDistance;

import timeseriesweka.classifiers.BagOfPatterns;
import timeseriesweka.filters.BagOfPatternsFilter;
import timeseriesweka.filters.SAX;
import weka.classifiers.lazy.kNN;
import weka.core.Instance;
import weka.core.Instances;
import weka.filters.SimpleBatchFilter;

/**
 * @author Alex
 *	
 */
public class NGram1NN extends TransformedBase {
	int alphaSize = 0;
	SAX sax = new SAX();
	kNN _1nn = new kNN();
	@Override
	public void buildClassifier(Instances data) throws Exception {
		Instances transed = transformInsts(data);
		transed.get(0);
	}

	@Override
	protected Instances getDataHeader() {
		return null;
	}

	@Override
	protected Instances transformInsts(Instances insts) throws Exception {
//		int []params = BagOfPatternsFilter.
		int arr[] = BagOfPatterns.parameterSearch(insts);
		BagOfPatternsFilter bof = new BagOfPatternsFilter(arr[0], arr[1], arr[2]);
		return bof.process(insts);
		
//		return sax.process(insts);
	}

	@Override
	protected Instance transformInst(Instance inst) {
		return null;
	}

}
